<?php 
namespace app\api\controller\v1;

use think\Controller;

class Word extends Controller
{
    public function Word()
    {
        $model = model('Word');
        $data = $model->getWord();// 查询数据
        if ($data) {
            $code = 200;
        } else {
            $code = 404;
        }
        $data = [
            'code' => $code,
            'data' => $data
        ];
        return json($data);
    }
}